package com.nanyang.tms.dao.ticket;

import com.nanyang.tms.domain.ticket.TicketRecordDO;
import com.nanyang.tms.domain.ticket.TicketRecordQuery;
import com.nanyang.tms.domain.ticket.TicketRecordVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>Description:(单号记录表)</p>
 *
 * @author lv
 * @date 2022年11月12日 下午11:03:57
 * @Copyright Copyright (c) 2020 www.nanyang.cn Inc. All rights reserved.
 */
@Mapper
public interface TicketRecordDao {
    /**
     * <p>deleteByPrimaryKey</p>
     * <p>Description:(根据主键删除)</p>
     *
     * @param id
     * @return int
     */
    int deleteByPrimaryKey(Long id);

    /**
     * <p>insert</p>
     * <p>Description:(新增（所有列）)</p>
     *
     * @param record
     * @return int
     */
    int insert(TicketRecordDO record);


    /**
     * <p>Description:(根据主键查询)</p>
     *
     * @param id
     * @return TicketRecordDO
     */
    TicketRecordDO selectByPrimaryKey(Long id);

    /**
     * <p>Description:(修改(选择的列))</p>
     *
     * @param record
     * @return int
     */
    int update(TicketRecordDO record);

    /**
     * 总数
     * @param ticketRecordQuery
     * @return
     */
    int countTicketRecord(TicketRecordQuery ticketRecordQuery);

    /**
     * 重复记录总数
     * @param ticketRecordQuery
     * @return
     */
    int countRepeatRecord(TicketRecordQuery ticketRecordQuery);

    /**
     * 列表
     * @param ticketRecordQuery
     * @return
     */
    List<TicketRecordVO> listTicketRecord(TicketRecordQuery ticketRecordQuery);

    /**
     * 详情
     * @param ticketTypeCode
     * @return
     */
    TicketRecordVO queryTicketRecord(String ticketTypeCode);

    List<TicketRecordVO> queryRecordCount(@Param("ticketCodeList") List<String> ticketCodeList);
}